<template>
  <div class="topDiv">
    用户名：<el-input v-model="userObj.userName" style="margin: 10px 0" placeholder="请输入用户名" /><br>
    密码：<el-input v-model="userObj.pwd" type="password" placeholder="请输入密码"/><br>
    <el-button type="primary" style="margin: 10px 0" @click="land">登陆</el-button>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data(){
    return{
      userObj:{}
    }
  },
  methods:{
    land(){
      axios.get("/project/user/login",{params: this.userObj}).then(resp =>{
        if (resp.data == "ok"){
          this.$router.push("/index")
        }
      })
    }
  }
}
</script>

<style scoped>
.topDiv{
  width: 260px;
  padding: 40px 60px;
  margin: 250px 680px;
  border: 1px solid #c8c9cc;
  border-radius: 5px;
}
</style>